namespace NDF.Test.DataAccess.EFTest
{
    using System;
    using System.Data.Entity;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Linq;
    using System.Data.Entity.Migrations;
    using NDF.DataAccess.EntityFramework.Migrations;

    public partial class BloggingContext : NDF.DataAccess.EntityFramework.DbContext
    {
        static BloggingContext()
        {
            //Database.SetInitializer<BloggingContext>(new MigrateDatabaseToLatestVersion<BloggingContext, DbMigrationsConfiguration<BloggingContext>>());
            Database.SetInitializer<BloggingContext>(new MigrationDatabaseIfModelChanges<BloggingContext, MigrationConfiguration<BloggingContext>>());
        }

        public BloggingContext() : base("name=BloggingContext")
        {
        }

        public virtual DbSet<Blog> Blogs { get; set; }
        public virtual DbSet<Post> Posts { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
        }
    }
}
